package com.d3works.apps.bpm.service;

import com.d3works.common.ResourceUtils;
import com.d3works.studio.service.loader.AppLoaderExportServiceImpl;
import java.io.InputStream;
import java.util.Map;

public class AppLoaderExportBpmServiceImpl extends AppLoaderExportServiceImpl {

  private static final String[] EXPORT_TEMPLATES =
      new String[] {"baml-model", "wkf-model", "wkf-dmn-model"};

  @Override
  protected Map<String, InputStream> getExportTemplateResources() {

    Map<String, InputStream> templateMap = super.getExportTemplateResources();

    for (String filePrefix : EXPORT_TEMPLATES) {
      templateMap.put(
          filePrefix + ".xml",
          ResourceUtils.getResourceStream("data-export/" + filePrefix + ".tmpl"));
    }

    return templateMap;
  }
}
